package com.cpecc.model.wuzi;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.cpecc.liucheng.model.HuanJie;
import com.cpecc.model.system.User;

@Entity
@Table(name = "DATA_WUZI_TUIHUO")
public class TuiHuo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3825647767039200508L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	private String id;
	
	@ManyToOne
	@JoinColumn(name="SHENQING_ID")
	private ShenQing shenQing;
	
	@ManyToOne
	@JoinColumn(name="WUZI_ID")
	private WuZi wuZi;
	
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;
	
	@Column
	private Date shenQingRQ;
	
	@Column(length=64)
	private String tuiHuoYY;
	
	@ManyToOne
	@JoinColumn(name="HUANJIE_ID")
	private HuanJie huanJie;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public ShenQing getShenQing() {
		return shenQing;
	}

	public void setShenQing(ShenQing shenQing) {
		this.shenQing = shenQing;
	}

	public WuZi getWuZi() {
		return wuZi;
	}

	public void setWuZi(WuZi wuZi) {
		this.wuZi = wuZi;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Date getShenQingRQ() {
		return shenQingRQ;
	}

	public void setShenQingRQ(Date shenQingRQ) {
		this.shenQingRQ = shenQingRQ;
	}

	public String getTuiHuoYY() {
		return tuiHuoYY;
	}

	public void setTuiHuoYY(String tuiHuoYY) {
		this.tuiHuoYY = tuiHuoYY;
	}	

	public HuanJie getHuanJie() {
		return huanJie;
	}

	public void setHuanJie(HuanJie huanJie) {
		this.huanJie = huanJie;
	}

	public TuiHuo(String id, ShenQing shenQing, WuZi wuZi, User user,
			Date shenQingRQ, String tuiHuoYY, HuanJie huanJie) {
		super();
		this.id = id;
		this.shenQing = shenQing;
		this.wuZi = wuZi;
		this.user = user;
		this.shenQingRQ = shenQingRQ;
		this.tuiHuoYY = tuiHuoYY;
		this.huanJie = huanJie;
	}

	public TuiHuo() {
		super();
	}	
}
